Quality control method for two-dimensional matrix codes on metallic workpieces, using an image processing device

ABSTRACT

The invention relates to a quality control method for two-dimensional matrix codes on metallic workpieces, said codes consisting of stamped marking dots. The stamping process for the marking dots is carried out by a marking tool ( 17 ) with the aid of predetermined digital positional data. The corresponding image data is then recorded for analysis by means of the image processing device ( 22 ), exclusively at the locations that have been predetermined by the positional data, or additional image data that has been previously generated is also used for the analysis, to establish whether a correct marking dot with the required quality characteristics is present.

The invention refers to a method for quality control for two-dimensionalmatrix codes on metallic workpieces, which are present in the form ofembossed marking dots, with an image processing device.

The marking dots of such a two-dimensional matrix code are normallyembossed by means of a hard-metal needle of a marking tool. This is doneon one hand very fast and on the other hand in a very narrowarrangement, wherein such matrix areas can be very small and possess alength and width of only a few millimeters. For being able to read backthe information of the matrix code without any errors, the precision inplacing the marking dots is of high importance, with the exact shape,size, position and depth of the marking dots being important qualityfeatures. It is therefore very critical to check, during or after theproduction of such a matrix code, whether the information can be readback without any errors, i. e. whether the marking dots are present inthe correct place in the necessary quality.

Known methods for the quality control of two-dimensional matrix codesuse a “finder function” like the one which is used at reading for theposition determination of the code array. The square matrix codes havetwo adjacent outlines with marking dots in narrow sequence. These twooutlines are searched in the image data collected by a camera as animage processing device for determining the position of the matrix codein this manner. The two other outlines have marking dots whose distancecorresponds, respectively, to the distance of the grid lines of a gridpossessing the marking dots as grid points. Thus, these grid points aredetermined from the image data and, subsequently, the calculated pointsare checked as to whether a marking dot of the desired quality ispositioned there. Due to image capture, image processing and subsequentcalculation, multiple error factors are included in quality controlwhich render the entire process very imprecise, in particular in case ofvery small distances between the dots.

The invention is based on the task of creating a method for fast, easyand precise quality control for two-dimensional matrix codes.

This task is accomplished, according to the invention, by the embossingprocess for the marking dots taking place based on preset digitalposition data, using a marking tool (17), and by the subsequentcapturing of the corresponding image data by means of the imageprocessing device (22), only at the sites precisely predetermined by theposition data, for checking whether at each site there is a correctmarking dot with the desired quality characteristics.

The advantages of the method according to the invention lie inparticular in the fact that the known finder function can be omitted andis replaced by a much more precise method for finding the marking dotsand checking the same. According to the invention, the position data forthe marking tool, which are preset anyway, are supplied to the imageprocessing device so that it possesses the exact coordinates of themarking dots even without image capture. The quality check then needsonly to be performed at these coordinate points. All errors of the knownmethods, which are related to determination of the coordinate positions,are therefore almost completely eliminated so that the quality check ofthe marking dots can be performed with much higher precision.

By means of the features recited in the dependent claims advantageousfurther developments and improvements of the method indicated in claim 1are possible.

For checking the desired quality characteristics of the respectivemarking dots, one or more of the following parameters are detected andcompared with default data: area, depth, length, width, area midpoint orcentroid, ellipticity. This check takes place by means of the imageinformation recorded at the coordinate sites. During this process,deviations from the default data can be documented or even evaluationcriteria given.

To compensate for any still existing small position offset, the averageof the positional deviations of all marking dots, respectively, issubtracted as an offset value. This is because such a position offsetdoes not contain any quality deviation of the code to be tested, butonly the imprecision of the positional relation used by the imageprocessing device or camera on the one hand and the marking tool on theother hand.

An advantageous measure for achieving high-grade quality controlconsists in the fact that before a matrix code is applied, a referenceimage of the corresponding surface portion of the workpiece is recordedand stored and/or evaluated. If the surface portion is recognized asbeing too bad, e. g. having a surface texture which is too rough orsevere defects, such as blow holes or mechanical damages, a shift to adifferent, better surface portion takes place which is, of course, alsochecked first. In this manner, a marking which can not be used can beavoided in the first place.

Another advantage of recording a reference image of the material surfacebefore applying a matrix code consists in the fact that a correlationbetween the reference image and the corresponding image data afterapplication of the matrix code is performed to eliminate interferingsurface texture data. By such a correlation of the reference image withthe image to be analyzed, differences between the actualphysical-geometrical properties of a marking dot and its opticalrepresentation by the camera in the form of pixel patterns are reducedand omitted from the evaluation of the coding to be evaluated. Thesedifferences can also be due to illumination, optics, CCD sensor andsignal filtering.

Another advantageous method for improving quality control consists inrecording the image data with different focus adjustments, in particularin recording them at varying distances between camera and workpiecesurface and correlating them. Interferences of various kinds can befiltered more easily in this manner.

Another advantageous measure for improving the quality control consistsin using an individual marking dot, previously recorded in a real manneras an image, electronically in an “artificial” image which is generatedby superimposing this “reference image” of a marking dot at all presettarget positions of marking dots of the code image to be measuredcurrently. This “reference image” of a marking dot may have beengenerated and be used in respect to various characteristics withdifferent qualities. As an alternative, this “reference image” may havebeen generated by statistical averaging of many marking dots reallygenerated.

Advantageously, the marking tool and the image processing device can bemoved in mechanical coupling with each other. In this manner, atolerance-free alternative positioning of the image processing device orcamera, respectively, on the one hand and of the marking tool on theother hand above the marking position of the workpiece is possible bymoving both with the same three-axis carriage system. Tolerance-freepositioning, also in the z axis, allows an imaging which is true toscale and, therefore, a size measurement which can be calibrated aswell.

An embodiment of the invention is represented in the FIGURE andexplained in detail in the following description. The only FIGURE showsa drawing in perspective of a marking tool attached to an adjustablesupport and firmly connected to a camera.

On a supporting table 10 for taking up metallic workpieces 11 to beprovided with a two-dimensional matrix code, a column 12 is arranged onwhich a holder 13 can be vertically moved and positioned by means of amotor drive 14. For guidance on the column 12 during movement in thevertical direction z, guide slots 15 are used.

On the holder 13, a carriage arrangement 16 is arranged through which amarking tool 17 can be driven and positioned in the two horizontal axes(x axis and y axis). The carriage arrangement 16 consists of anx-carriage 18 for the direction x and a y-carriage 19 for the directiony. Each of the carriages 18 and 19 is equipped with motor positioningdrives, with only the positioning drive 20 for the x-carriage 18 beingrecognizable in the perspective drawing.

By means of a spacing element 21, the marking tool 17 is firmlyconnected to an image processing device devised as a camera 22 which canbe implemented e. g. as a CCD camera. Around the lens 23 of the camera22, an illumination device 24 is arranged for illuminating the matrixarea as well as possible. Naturally, the illumination device 24 can alsobe arranged in a different position on the camera 22 and/or the markingtool 17.

The marking tool 17 possesses a striking tool devised e. g. as ahard-metal needle 25 which, after suitable positioning, executesstriking movements against the workpiece 11 for creating the markingdots executed as striking recesses. A multiplicity of such marking dotsthen forms a two-dimensional matrix code 26, with the presence or lackof the marking dots at the respective grid points representing thebinary encoded information. During this process, the motor drive 14 forthe holder 13 and the carriage arrangement 16 are used for positioningthe marking tool 17 above the site to be encoded on the metallicworkpiece 11.

Before the marking process starts, the camera 22 is positioned above thesite to be encoded and captures a reference image signal of the area tobe encoded. Based on this reference image signal, an evaluation of thesurface texture can take place, e. g. gray-scale value distribution andvariance. By means of a threshold evaluation, it can be tested whetherthe site intended for marking is at all suitable for this purpose orwhether e. g. the surface roughness is too great or severe defects, suchas blow holes etc., are present, or whether this area shows substantialmechanical damages making it unsuitable for code marking. If theevaluation indicates that the envisaged site is not suitable for markingfor the reasons stated above, a better marking site more free frominterference is searched by moving the carriage arrangement 16. Thefound site is then taken into account or accepted, respectively, in themarking control with its offset values.

Subsequently, the marking tool 17 is shifted by means of the x-carriage18 over a distance corresponding precisely to the distance between thelens 23 of the camera 22 and the hard-metal needle 25. In this manner,the marking tool is positioned exactly where the camera 22 waspositioned before. Now, by a sequence of striking movements of thehard-metal needle 25 and movements of the carriage arrangement 16, thematrix code 26 is generated. The positions of the individual matrixpoints are preset by means of stored digital position data.

Subsequently, the camera 22 is driven back into its original position bymovement of the x-carriage 18, i. e. in a position above the nowexisting matrix code 26. The camera now records a test image signal. Bycorrelation with the reference image signal which has already beenrecorded and stored, e. g. the surface texture of the metallic workpiece11, which interferes with the quality check for the marking dots, can bemasked out. This means de facto a masking of any interference signalsdue to the surface texture which would falsify the image pointinformation to be evaluated for the marking dots. Other disturbinginfluences for the quality check can be caused by the illumination, theoptics, the camera or signal filtering. These influences can beeliminated by such a correlation as well.

Now the actual quality check of the marking dots at the sites indicatedby the stored coordinates takes place. These coordinates are basicallythe same as those controlling the marking process of the marking tool.The quality check can be performed in different ways and with differentamounts of effort. Quality criteria are e. g. the area, the length, thewidth, the ellipticity, the depth, the area midpoint and centroid of themarking dots. At the position data, the corresponding image data of themarking dots are recorded and compared with stored default values. Aquality check is performed according to detected deviations. This can bereproduced in detail or, in the simplest case, exceeding of maximumpermissible deviations leads to optical and/or acoustic alarms.

For compensation of any existing position offset, i. e. a homogeneousdisplacement of all x and y values by a certain amount, the average ofall positional deviations is determined as an offset value and acorresponding correction is performed. Such an offset does not representany quality deviation of the marking dots to be checked, but only animprecision of the employed positional relation of camera 22 and markingtool 17, whatever may have caused this imprecision. As a variation ofthe presented embodiment, the linear movement described can also bereplaced by a swinging movement for the reciprocal positioning of themarking tool 17 and the camera 22. For instance, a swivel axis could bearranged on center between the marking tool 17 and the camera 22 so thatthe change in position can be performed respectively by a 180° swingingmovement. In a simpler embodiment, the movement of the camera 22 can beuncoupled from the marking tool 17 as well and, for instance, the cameracan be firmly marked or have an independent drive. Since this makes therecording position of the camera deviate from that of the marking tool,this must be taken into account during conversion of the position datafor the marking dots. Also the tolerance-free positioning possibleduring synchronous movement and representation to scale must accordinglybe compensated for electronically as well.

In the described embodiment, image processing for quality control iscombined with the production machine, i. e. with the marking tool. Thepurpose is mainly to guarantee the quality of the generated matrix codessuch that they can be read perfectly by reading devices during lateruse. In principle, the method according to the invention can also becarried out independently of a marking tool.

In a simpler embodiment, the recording of a reference image signal andthe comparison with the test image signal can also be omitted, inparticular if workpieces, which have none or only a minimum surfacetexture, are to be provided with a matrix code 26.

1. Method for the quality control of two-dimensional matrix codes onmetallic workpieces, present in the form of embossed marking dots, withan image processing device, comprising: embossing a metallic workpieceto form the marking dots, based on preset digital position data, using amarking tool; subsequently, by means of the image processing device,capturing corresponding image data, only for sites indicated by theposition data; and evaluating, based on the captured image data, whetheror not correct marking dots at each site have the desired qualitycharacteristics.
 2. A method according to claim 1, wherein the desiredquality characteristics of the marking dots are evaluated by detecting,comparing with default data and/or classifying and/or monitoring as atrend, at least one of the following parameters: area, depth, length,width, position of area midpoint or centroid, ellipticity, statisticalcharacteristic derived from the at least one parameter average value ofthe at least one parameter, standard deviation of the at least oneparameter, and type of distribution or class frequency of the at leastone parameter.
 3. A method according to claim 1 further comprising:averaging positional deviations for all marking dots to obtain an offsetvalue; and compensating for a possible position offset by subtractingthe offset value from the respective positional deviations.
 4. A methodaccording to claim 1 further comprising, prior to said embossing,recording and/or evaluating a reference image of the sites on themetallic workpiece.
 5. A method according to claim 4, wherein,responsive to recognition of a surface portion within a reference imageas bad, shifting the site for embossing to a different surface portion.6. A method according to claim 4 further comprising comparing thereference image and the corresponding image data captured afterembossing, to eliminate interfering surface texture data.
 7. A methodaccording to claim 1 wherein image data is recorded at different focusadjustments and correlated.
 8. A method according to claim 1 whereinsaid evaluating of the captured image data includes correlation with areference pattern by superimposing an individual image of an individualmarking dot, previously obtained in system calibration by the imageprocessing device, on an image corresponding to the captured image data,for each site.
 9. A method according to claim 8, wherein thesuperimposed individual image is an actual image of an actual markingdot, which actual image has previously been classified with respect toone or more specific characteristics or an image which was obtained bystatistical averaging, for a multiplicity of marking dots, with therespective quality characteristics.
 10. A method according to claim 1wherein the marking tool and the image processing device are movedmechanically coupled to with each other.
 11. A method according to claim5 further comprising comparing the reference image and the correspondingimage data captured after embossing, to eliminate interfering surfacetexture data.